<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
</head>
<style>
    *{
     margin: 0;
     padding: 0;
    }
    .box{
        width: 400px;
        height: 20px;
        background-color: black;
        border-radius: 10px;
        border: 2px solid black;
    }
    .box1{
        width: 25%;
        height: 20px;
        background-color:cornflowerblue;
        border-radius: 10px;
        display: flex;
       justify-content: center;
        align-items: center;
        transition: all 1s;
    }
    button{
        width: 50px;
    }
</style>
<body>
    <div id="app">
     <div class="box">
        <div class="box1" :style="{width:percent+'%'}" >
       <span>{{percent}}%</span>
        </div> 
     </div>
     <button @click="fu(25)">25%</button>
     <button @click="fu(50)">50%</button>
     <button @click="fu(75)">75%</button>
     <button @click="fu(100)">100%</button>
    </div>
</body>
<script>
   const app=new Vue({
    el:'#app',
    data:{
        percent:0,
    },
    methods: {
        fu(percent){
            this.percent=percent
        }
    }
   })
</script>
</html>